package com.lsy.on_line.zaixian.service;

import com.lsy.on_line.zaixian.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ShiYuan
 * @since 2022-07-24
 */
public interface IUserService extends IService<User> {


    /**
     * 注册：新增用户信息
     * @param userInfo
     * @return
     */
    int save(Map<String,String> userInfo);

    /**
     * 登录
     * @param phone
     * @param pwd
     * @return
     */
    String findByPhoneAndPwd(String phone, String pwd);

    /**
     * 根据用户id查询用户信息
     * @param userId
     * @return
     */
    User findByToken(Integer userId);
}
